package com.jxpanda.spring.module.wechat.component.http.base.request.query;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Builder;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * @author Panda
 */
public class MiniProgramQuery {

    @Getter
    @Builder(toBuilder = true)
    @RequiredArgsConstructor
    public static final class AccessToken {
        @JsonProperty("appid")
        private final String appId;
        @JsonProperty("secret")
        private final String secret;
        @JsonProperty("grant_type")
        private final String grantType = "client_credential";
    }

    @Getter
    @Builder(toBuilder = true)
    @RequiredArgsConstructor
    public static final class JsCode2Session {
        @JsonProperty("appid")
        private final String appId;
        @JsonProperty("secret")
        private final String secret;
        @JsonProperty("js_code")
        private final String jsCode;
        @JsonProperty("grant_type")
        private final String grantType = "authorization_code";
    }

}
